Repository navigation
Fix legend D without offset and G without argument - #9280
Merged
Merged
Conversation
- D: "D pen flag" (offset left out) was read as offset=pen, pen=flag when estimating the legend height, but as pen+flag when drawing, so the automatic height differed from "D 0 pen flag". Read it the same way. - G: a G record without argument read past the end of the record, giving garbage warnings and exit code 0. Report a clear error instead. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Member
Member
Author
Member
Author
|
The |
joa-quim
approved these changes
Oct 28, 2026
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Two more small bugs in the
legendrecords, found while auditingpslegend.c(follow-up to #9277). Bugs found by Claude Opus 5.5; fix written by Claude Sonnet 5.5.This was first pushed directly to master by mistake and reverted in f0d9d18; this PR proposes it again.
D 1p +(offset left out): the legend height estimate read it as offset=1p, pen=+, but drawing reads it as pen=1pwith flag+. So the automatic height of the box was different from the one forD 0 1p +, which draws exactly the same. The same happens with the flags-and=.Gwithout argument: it read past the end of the record, printing garbage warnings and exiting with code 0. It now reportsNot enough arguments given to G operator.Scripts to see both:
In 1, master gives 1.446 cm for
D 1p +and 1.330 cm forD 0 1p +; with this PR both are 1.330 cm. In 2, master prints warnings with garbage characters and returns 0; now it prints the error and returns an error code.🤖 Generated with Claude Code